<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set raw post data</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="httprequest.setquerydata.html">HttpRequest::setQueryData</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="httprequest.setssloptions.html">HttpRequest::setSslOptions</a></div>
 <div class="up"><a href="class.httprequest.html">HttpRequest</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="httprequest.setrawpostdata" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">HttpRequest::setRawPostData</h1>
  <p class="verinfo">(PECL pecl_http 0.14.0-1.4.1)</p><p class="refpurpose"><span class="refname">HttpRequest::setRawPostData</span> &mdash; <span class="dc-title">Set raw post data</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-httprequest.setrawpostdata-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">bool</span> <span class="methodname"><strong>HttpRequest::setRawPostData</strong></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$raw_post_data</code></span>
  ] )</div>


  <p class="para rdfs-comment">
   Set raw post data to send, overwriting previously set raw post data. Don&#039;t 
   forget to specify a content type. Affects only POST and custom requests.
  </p>
  <p class="para">
   Only either post fields or raw post data can be used for each request.
   Raw post data has higher precedence and will be used even if post fields
   are set.
  </p>
  
  <div class="warning"><strong class="warning">Warning</strong>
   <p class="simpara">
    This function alias is <em class="emphasis">DEPRECATED</em> and only
    exists for backwards compatibility reasons. The use of this function
    is not recommended, as it may be removed from PHP in the future.
    <span class="function"><a href="httprequest.setbody.html" class="function">HttpRequest::setBody()</a></span> should be used instead.
   </p>
  </div>

 </div>

 <div class="refsect1 parameters" id="refsect1-httprequest.setrawpostdata-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">raw_post_data</code></em></dt>

     <dd>

      <p class="para">
       raw post data
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-httprequest.setrawpostdata-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
  成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 


 


 


 <div class="refsect1 seealso" id="refsect1-httprequest.setrawpostdata-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="httprequest.setbody.html" class="function" rel="rdfs-seeAlso">HttpRequest::setBody()</a> - Set request body to send, overwriting previously set request body.</span></li>
   </ul>
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="httprequest.setquerydata.html">HttpRequest::setQueryData</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="httprequest.setssloptions.html">HttpRequest::setSslOptions</a></div>
 <div class="up"><a href="class.httprequest.html">HttpRequest</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
